package implement

import (
	"time"

	"math/rand"
)

// 打乱顺序
func Shuffle(arr []int) {
	rand.Seed(time.Now().UnixNano())

	n := len(arr)
	for i := 0; i < n; i++ {
		j := rand.Intn(i + 1)
		arr[i], arr[j] = arr[j], arr[i]
	}
}
